//
//  SubGroupTableViewCell.m
//  SafeFoodManagerDemo
//
//  Created by bob on 2017/11/6.
//  Copyright © 2017年 bob. All rights reserved.
//

#import "SubGroupTableViewCell.h"
#import "UILabel+NSAttributeString.h"
@implementation SubGroupTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)setDeleStatue:(BOOL)deleStatue
{
    _deleStatue=deleStatue;
    
    if (deleStatue) {
        
        self.editImageView.hidden=NO;
        
    }else{
        
        self.editImageView.hidden=YES;
        
    }
    
}

-(void)setModel:(SubGroupData *)model
{
    _model=model;
    
    if (model.mark.length==0) {
        
        model.mark=@"";
        
        self.GroubNameLabel.text=model.name;
        
    }else{
    
    self.GroubNameLabel.attributedText=[self.GroubNameLabel appShopName:model.name andCheckList:model.mark];
    }
    if (self.isClick) {
  
        if (model.Seleclt) {
            
            self.editImageView.image=[UIImage imageNamed:@"Select"];
            
        }else{
            
            self.editImageView.image=[UIImage imageNamed:@"UnSelect"];
        }
        
    }
    
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
